﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ByrForumAPI.MetaData
{
    public class Mail
    {
        //信件编号，此编号为/mail/:box/:num中的num 
        [JsonProperty("index")]
        public int Index { get; internal set; }

        //是否标记为m  
        [JsonProperty("is_m")]
        public bool IsM { get; internal set; }

        //是否已读  
        [JsonProperty("is_read")]
        public bool IsRead { get; internal set; }

        //是否回复  
        [JsonProperty("is_reply")]
        public bool IsReply { get; internal set; }

         //是否有附件  
        [JsonProperty("has_attachment")]
        public bool HasAttachment { get; internal set; }

        //信件标题  
        [JsonProperty("title")]
        public string Title { get; internal set; }

        //发信人，此为user元数据，如果user不存在则为用户id    
        [JsonProperty("user")]
        public User User { get; internal set; }

        //发信时间    
        [JsonProperty("post_time")]
        public int PostTime { get; internal set; }

        //发信时间    
        [JsonProperty("box_name")]
        public string BoxName { get; internal set; }

        //信件内容 只存在于/mail/:box/:num中    
        [JsonProperty("content")]
        public string Content { get; internal set; }

        //信件的附件列表 只存在于/mail/:box/:num中   
        [JsonProperty("attachment")]
        public Attachment Attachment { get; internal set; }

    }
}
